package me.idashu.attg.domain;

public class PageEntity {
	/**
	 * 当前页
	 */
    private int page =1;
    /**
     * 总的页数
     */
    private int totalPage;
    /**
     * 每页显示多少条
     */
    private int pageSize =2;
    /**
     * 前一页
     */
    private int pageLess;
    
	public int getPage() {
		return page;
	}
	public void setPage(int page) {
		this.page = page;
	}
	public int getTotalPage() {
		return totalPage;
	}
	public void setTotalPage(int total) {
		this.totalPage = total%pageSize > 0?total/pageSize+1 : total/pageSize;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getPageLess() {
		return pageLess;
	}
	public void setPageLess(int pageNext) {
		this.pageLess = (pageNext-1)*pageSize;
	}
}
